package com.huang.auth.converter;

import com.huang.auth.entity.po.AuthUserPO;
import com.huang.auth.entity.vo.AuthUserVO;
import com.huang.base.core.BaseConvertor;
import org.springframework.stereotype.Component;

/**
 * @author HuangShen
 * @Description AuthUserResponse转换列
 * @create 2021-09-20 17:04
 */
@Component
public class AuthUserVOConverter extends BaseConvertor<AuthUserPO, AuthUserVO> {

    @Override
    public AuthUserVO doConvert(AuthUserPO authUserPO) {
        AuthUserVO authUserVO = new AuthUserVO();
        authUserVO.setId(authUserPO.getId().toString());
        authUserVO.setAccount(authUserPO.getAccount());
        authUserVO.setAvatar(authUserPO.getAvatar());
        authUserVO.setCreateTime(authUserPO.getCreateTime());
        authUserVO.setCreateUser(authUserPO.getCreateUser());
        authUserVO.setEmail(authUserPO.getEmail());
        authUserVO.setLastLoginTime(authUserPO.getLastLoginTime());
        authUserVO.setMobile(authUserPO.getMobile());
        authUserVO.setName(authUserPO.getName());
        authUserVO.setSex(authUserPO.getSex());
        authUserVO.setWorkDescribe(authUserPO.getWorkDescribe());
        authUserVO.setStatus(authUserPO.getStatus());
        authUserVO.setUpdateTime(authUserPO.getUpdateTime());
        authUserVO.setPasswordErrorLastTime((authUserPO).getPasswordErrorLastTime());
        authUserVO.setPasswordErrorNum(authUserPO.getPasswordErrorNum());
        return authUserVO;
    }


}
